/*
 * This file is part of Smart Route for S60 3rd Edition terminals
 * 
 * Copyright (C) 2006  Harri Salminen

 * This program free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 *(at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
 
#ifndef SMARTROUTESETTINGITEMLIST_H
#define SMARTROUTESETTINGITEMLIST_H

// [[[ begin generated region: do not modify [Generated Includes]
#include <aknsettingitemlist.h>
#include <akncolourselectiongrid.h> 

// ]]] end generated region [Generated Includes]


// [[[ begin [Event Handler Includes]
// ]]] end [Event Handler Includes]

// [[[ begin generated region: do not modify [Generated Forward Declarations]
class MEikCommandObserver;
// ]]] end generated region [Generated Forward Declarations]

/**
 * @class	CSmartRouteSettingItemList SmartRouteSettingItemList.h
 * @brief	
 * @version	[version] TODO
 */
class CSmartRouteSettingItemList : public CAknSettingItemList
	{
public: // constructors and destructor

	CSmartRouteSettingItemList(MEikCommandObserver* aCommandObserver );
	virtual ~CSmartRouteSettingItemList();

public:
	// overrides of CAknSettingItemList
	CAknSettingItem* CreateSettingItemL( TInt id );
	void EditItemL ( TInt aIndex, TBool aCalledFromMenu );
	virtual TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );

public:
	// utility function for menu
	void ChangeSelectedItemL();

	void LoadSettingValuesL();
	void SaveSettingValuesL();
		
private:
	// override of CAknSettingItemList
	void SizeChanged();

private:
	// current settings values
	MEikCommandObserver* iCommandObserver;
	// [[[ begin generated region: do not modify [Generated Methods]
public: 
	// ]]] end generated region [Generated Methods]
	
	// [[[ begin generated region: do not modify [Generated Type Declarations]
public: 
	// ]]] end generated region [Generated Type Declarations]
	
	// [[[ begin generated region: do not modify [Generated Instance Variables]
private: 
	// ]]] end generated region [Generated Instance Variables]
	
	
	// [[[ begin [Overridden Methods]
protected: 
	// ]]] end [Overridden Methods]
	
	
	// [[[ begin [User Handlers]
protected: 
	// ]]] end [User Handlers]
	
	};
	
class CSmartRouteColourSettingItem : public CAknSettingItem
	{
	public: 
		CSmartRouteColourSettingItem(TInt aIdentifier, TRgb& aColour);
		~CSmartRouteColourSettingItem();
		
		void EditItemL(TBool aCalledFromMenu);
		const TDesC& SettingTextL();     
	private: 
		TRgb& iColour;
		HBufC* iSettingText;
	};
	
#endif // SMARTROUTESETTINGITEMLIST_H
